package com.reggie.common.enums.backend;

import com.reggie.common.ResultResponseVo;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author 早睡蛋
 * @Date 2022/9/20 20:56:55
 * @Desc:
 */
@Getter
@AllArgsConstructor
public enum DishEnum {

    SUCCESS(200,"ok"),
    FAIL(400,"fail"),

    DEL_OK(200,"删除成功"),
    DEL_FAIL(400,"删除失败"),

    ADD_OK(200,"添加成功"),
    ADD_FAIL(400,"添加失败"),

    UPDATE_OK(200,"修改成功"),
    UPDATE_FAIL(400,"修改失败"),

    STATUS_IsCHANGE(200,"菜品状态更改成功"),
    STATUS_IsNotCHANGE(400,"菜品状态更改失败"),

    SIZE_MAX(400,"批量操作限定个数需要<=10"),

    STATUS_ON(400,"状态为起售，不能删除"),



    ;


    DishEnum(int code, String message) {
        this.resultResponseVo =  ResultResponseVo.defaultResultResponse();
        resultResponseVo.setCode(code);
        resultResponseVo.setMessage(message);
    }

    public int getCode(){
        return resultResponseVo.getCode();
    }

    public String getMessage(){
        return resultResponseVo.getMessage();
    }

    public ResultResponseVo getResult() {
        return resultResponseVo;
    }


    private final ResultResponseVo resultResponseVo;
}
